﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Ordinaire.Commerce
{
    /// <summary>
    /// Provides commerce common calculation.
    /// </summary>
    public class CommerceCalculator
    {
        /// <summary>
        /// Disable constructor.
        /// </summary>
        private CommerceCalculator() {}

        /// <summary>
        /// Returns the unit value.
        /// </summary>
        /// <param name="value">the value for the specified quantity</param>
        /// <param name="quantity">the quantity for the specified value</param>
        /// <returns>the unit value</returns>
        public static decimal ValuePerUnit(decimal value, int quantity)
        {
            return value / quantity;
        }
    }
}
